package com.dkha.task.util;

import com.dkha.common.modules.vo.camera.PeopleVO;
import com.dkha.common.modules.vo.face.FeatureVO;
import com.dkha.common.modules.vo.position.PositionVO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @version V1.0
 * @Description: TODO(please write your description)
 * All rights 成都电科慧安
 * @Title: PeopleComparableUitl
 * @Package com.dkha.task.util
 * @author: panhui
 * @date: 2020/1/14 16:09
 * @Copyright: 成都电科慧安
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class PeopleComparableUitl  implements Comparable<PeopleComparableUitl>{
    private String esId;
    private String faceUrl;
    private String bgUrl;
    private PositionVO position;
    private Long timestamp;
    private String time;
    private Double score;
    private FeatureVO featureVO;
    private String faceId;

    @Override
    public int compareTo(PeopleComparableUitl peopleVO) {

        if(this.timestamp.intValue()!=peopleVO.getTimestamp().intValue())
        {
            return (this.timestamp.intValue()-peopleVO.getTimestamp().intValue());
        }
        return 0;
    }
}
